package com.wswy.wzcx.api;


import com.che.libcommon.api.page.PageList;
import com.wswy.wzcx.model.AdConfigs;
import com.wswy.wzcx.model.BookMode;
import com.wswy.wzcx.model.DeviceMod;
import com.wswy.wzcx.model.JZCFMode;
import com.wswy.wzcx.model.MessageDetail;
import com.wswy.wzcx.model.MessageMode;
import com.wswy.wzcx.model.MyOrderMode;
import com.wswy.wzcx.model.AdModel;
import com.wswy.wzcx.model.OCRResult;
import com.wswy.wzcx.model.PaymentOrder;
import com.wswy.wzcx.model.TabConfResp;
import com.wswy.wzcx.model.TrafficViolationInfo;
import com.wswy.wzcx.model.UpgradeModel;
import com.wswy.wzcx.model.UserMode;
import com.wswy.wzcx.model.VersionModel;
import com.wswy.wzcx.model.car.CarExtendInfo;
import com.wswy.wzcx.model.car.CarTypeResp;
import com.wswy.wzcx.model.car.JZGCity;
import com.wswy.wzcx.model.conf.SysConfMap;
import com.wswy.wzcx.model.core.BgWorkModel;
import com.wswy.wzcx.model.core.OSSToken;
import com.wswy.wzcx.model.dfnew.NewWare;
import com.wswy.wzcx.model.dfnew.News;
import com.wswy.wzcx.model.dmv.DepartmentInfo;
import com.wswy.wzcx.model.dmv.ServiceCatagory;
import com.wswy.wzcx.model.fkdj.FineExtraFeeResp;
import com.wswy.wzcx.model.fkdj.FinePaymentDetail;
import com.wswy.wzcx.model.gov.GovParseResp;
import com.wswy.wzcx.model.license.CheckLicenseAvailableModel;
import com.wswy.wzcx.model.license.UserCarInfo;
import com.wswy.wzcx.model.news.NewsCategory;
import com.wswy.wzcx.model.news.NewsModel;
import com.wswy.wzcx.model.njdb.NjdbPreModel;
import com.wswy.wzcx.model.pay.OrderStatus;
import com.wswy.wzcx.model.resp.CaptchaData;
import com.wswy.wzcx.model.resp.CaptchaValidData;
import com.wswy.wzcx.model.resp.CityListResp;
import com.wswy.wzcx.model.coupon.CouponResp;
import com.wswy.wzcx.model.resp.OilPriceResp;
import com.wswy.wzcx.model.resp.PhoneCheckResp;
import com.wswy.wzcx.model.resp.PhoneSmsCodeValidResp;
import com.wswy.wzcx.model.resp.TrafficViolationResp;
import com.wswy.wzcx.model.topic.CommentModel;
import com.wswy.wzcx.model.topic.TopicListResp;
import com.wswy.wzcx.model.topic.TopicModel;
import com.wswy.wzcx.model.topic.TopicTagType;
import com.wswy.wzcx.model.topic.TopicViewResp;
import com.wswy.wzcx.model.weather.CarTips;
import com.wswy.wzcx.model.wzdb.WzdbCreateResp;
import com.wswy.wzcx.model.wzdb.WzdbOrderInfo;
import com.wswy.wzcx.ui.data.FKDJMode;
import com.wswy.wzcx.ui.data.JZCFResult;
import com.wswy.wzcx.ui.data.OrderNoNeedParam;
import com.wswy.wzcx.ui.data.WZDBMode;
import com.wswy.wzcx.ui.data.UserMessage;
import com.wswy.wzcx.ui.module.feedback.CommonFeedbackQA;
import com.wswy.wzcx.ui.module.feedback.FeedbackModel;

import io.reactivex.Flowable;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

interface BaseService {

    @FormUrlEncoded()
    @POST("tab-conf/uuid")
    Flowable<ApiResult<DeviceMod>> requestDevice(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("app/version/android-update")
    Flowable<ApiResult<VersionModel>> fetchVersion(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("tab-conf/app-sys-conf")
    Flowable<ApiResult<SysConfMap>> getSysConf(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/advert/list")
    Flowable<ApiResult<AdConfigs>> getAllAdConfig(@FieldMap Map<String, String> map);

    @GET("v1/advert/config")
    Flowable<ApiResult<Map<String, String>>> getAllAdIdConfig(@QueryMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("push-tag/list")
    Flowable<ApiResult<Map<String, String>>> getPushTags(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("tips/index")
    Flowable<ApiResult<Map<String, List<CarTips>>>> getCarTips(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("tab-conf/app-column-conf")
    Flowable<ApiResult<TabConfResp>> getTabConf(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/phone/send")
    Flowable<ApiResult<Boolean>> fetchPhoneVer(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("phone/check")
    Flowable<ApiResult<PhoneCheckResp>> phoneCheck(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("login/wechat-bind-valid")
    Flowable<ApiResult<PhoneCheckResp>> wechatBindCheck(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("phone/valid")
    Flowable<ApiResult<PhoneSmsCodeValidResp>> phoneSmsCodeValid(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("login/no-pass")
    Flowable<ApiResult<UserMode>> fetchLoginPhone(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("login/in")
    Flowable<ApiResult<UserMode>> fetchAccLogin(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("login/one-click")
    Flowable<ApiResult<UserMode>> fetchOneKeyLogin(@FieldMap Map<String, String> map);

    /**
     * 注册 登录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("login/reg-login")
    Flowable<ApiResult<UserMode>> regLogin(@FieldMap Map<String, String> map);


    /**
     * 微信登录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("login/wechat")
    Flowable<ApiResult<UserMode>> wechatLogin(@FieldMap Map<String, String> map);

    /**
     * 微信登录
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("login/wechat-bind")
    Flowable<ApiResult<UserMode>> wechatBind(@FieldMap Map<String, String> map);

    /**
     * 用户--解除微信绑定
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("user/wechat-untied")
    Flowable<SimpleApiResult> userWechatUnbind(@FieldMap Map<String, String> map);

    /**
     * 用户--微信绑定
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("user/wechat-bind")
    Flowable<SimpleApiResult> userWechatBind(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("login/out")
    Flowable<ApiResult<String>> submitLogout(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("/user/logout")
    Flowable<ApiResult<String>> submitAccountLogout(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("user/avatar")
    Flowable<ApiResult<UserMode>> submitUserInfoHeader(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("user/nickname")
    Flowable<ApiResult<UserMode>> fetchUpdateNickName(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("user/pass")
    Flowable<ApiResult<UserMode>> submitNewPwd(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("user/modify-pass")
    Flowable<ApiResult<UserMode>> changePwd(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/login/reset-pass")
    Flowable<SimpleApiResult> resetPwd(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("user/info")
    Flowable<ApiResult<UserMode>> getUserInfo(@FieldMap Map<String, String> map);

    ////---- 车辆违章查询

    @FormUrlEncoded()
    @POST("query/get-area-cha-xun-rules-app")
    Flowable<ApiResult<CheckLicenseAvailableModel>> checkLicenseAvailable(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("query/get-area-cha-xun-rules-by-city-name")
    Flowable<ApiResult<CheckLicenseAvailableModel>> checkLicenseByLocation(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v2/query/violation")
    Flowable<ApiResult<TrafficViolationResp>> violationQuery(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("v2/car/violation-query")
    Flowable<ApiResult<TrafficViolationResp>> carFineList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/car/list")
    Flowable<ListResult<UserCarInfo>> myCars(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("v1/car/modify")
    Flowable<ApiResult<UserCarInfo>> updateCar(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/car/delete")
    Flowable<SimpleApiResult> deleteCar(@FieldMap Map<String, String> map);


    //// --- 记账本
    @FormUrlEncoded()
    @POST("car-expenses/expenses-list")
    Flowable<ApiResult<BookMode>> fetchBillList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("car-expenses/add-expenses")
    Flowable<SimpleApiResult> submitBill(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("car-expenses/delete-expenses")
    Flowable<SimpleApiResult> submitDel(@FieldMap Map<String, String> id);

    @FormUrlEncoded()
    @POST("car-expenses/modify-expenses")
    Flowable<SimpleApiResult> submitUpdateBill(@FieldMap Map<String, String> params);


    ////--- 消息
    @FormUrlEncoded()
    @POST("message/newest")
    Flowable<ApiResult<MessageMode>> fetchPushMessage(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("message/page-list")
    Flowable<ApiResult<PageList<MessageDetail>>> getMessageList(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("feedback/get-unread-reply")
    Flowable<ApiResult<Integer>> fetchFeedbackCount(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("message/set-read-by-type")
    Flowable<SimpleApiResult> submitReady(@FieldMap Map<String, String> type);


    /// -- 其他

    @FormUrlEncoded()
    @POST("app/ocr/save-ocr")
    Flowable<ApiResult<String>> reportOcrResult(@FieldMap Map<String, String> type);


    ///---- 车管所
    @FormUrlEncoded()
    @POST("gov/get-gov-services-type")
    Flowable<ListResult<ServiceCatagory>> getServiceCatagories(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("gov/get-city-agencies-app")
    Flowable<ApiResult<PageList<DepartmentInfo>>> getDepartmentInfo(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("driver-license/list")
    Flowable<ApiResult<List<JZCFMode>>> fetchJZList(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("driver-license/create")
    Flowable<ApiResult<JZCFMode>> submitJZCFMode(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("driver-license/update")
    Flowable<ApiResult<JZCFMode>> submitEditJZCFMode(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("driver-license/delete")
    Flowable<ApiResult<String>> deleteJZCFMode(@FieldMap Map<String, String> id1);

    /**
     * 驾驶证查分
     *
     * @param params
     * @return
     */
    @FormUrlEncoded()
    @POST("driver-license/query")
    Flowable<ApiResult<JZCFResult>> fetchJZCFResult(@FieldMap Map<String, String> params);

    /**
     * 提交罚款订单
     *
     * @param params
     * @return
     */
    @FormUrlEncoded()
    @POST("v1/fine/create")
    Flowable<ApiResult<PaymentOrder>> submitFKDJMode(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("fine/area-point")
    Flowable<ApiResult<String>> areaFineHint(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/fine/get-amount")
    Flowable<ApiResult<FineExtraFeeResp>> getFKDJExtraFee(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("query-che-car/violation")
    Flowable<ApiResult<List<WZDBMode>>> fetchWZDBData(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/violation/create")
    Flowable<ApiResult<WzdbCreateResp>> submitWZDBList(@FieldMap Map<String, String> map);

    @Multipart
    @POST("v1/violation/additional-information")
    Flowable<ApiResult<WzdbOrderInfo>> addWZDBCertInfo(@Part List<MultipartBody.Part> map);

    @FormUrlEncoded()
    @POST("v1/violation/get-pay-info")
    Flowable<ApiResult<PaymentOrder>> payWZDB(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/violation/get-wait-pay-info")
    Flowable<ApiResult<WzdbOrderInfo>> getWZDBOrderInfo(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("fine/che-car-detail")
    Flowable<ApiResult<FinePaymentDetail>> checkFineNo(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("v1/order/miss-contact")
    Flowable<ApiResult<WzdbCreateResp>> fetchOrderNeedParams(@FieldMap Map<String, String> map);

    @Multipart
    @POST("order/improve-contact")
    Flowable<ApiResult<WzdbOrderInfo>> submitNeedParams(@Part List<MultipartBody.Part> map);

    @FormUrlEncoded()
    @POST("order/list")
    Flowable<ApiResult<List<MyOrderMode>>> fetchOrderList(@FieldMap Map<String, String> map);

    @FormUrlEncoded()
    @POST("pc/news/get-article-category")
    Flowable<ListResult<NewsCategory>> getNewsCategories(@FieldMap Map<String, String> map);


    @FormUrlEncoded()
    @POST("pc/news/get-category-list-by-pinyin-abbr")
    Flowable<ApiResult<PageList<NewsModel>>> getNews(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("est-news/auto-home-recommend")
    Flowable<ApiResult<List<NewsModel>>> getRecommendNews(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("car-type/brand")
    Flowable<ApiResult<List<CarTypeResp>>> carBrands(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("car-type/series")
    Flowable<ApiResult<List<CarTypeResp>>> carSeries(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("car-type/specification")
    Flowable<ApiResult<List<CarTypeResp>>> carSpecification(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/car/company")
    Flowable<ApiResult<List<String>>> carInsuranceCompany(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/car/insurance")
    Flowable<ApiResult<CarExtendInfo>> carInsurance(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("v1/car/inspection")
    Flowable<ApiResult<CarExtendInfo>> carInspection(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/car/valuation")
    Flowable<ApiResult<CarExtendInfo>> carValuation(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("car-type/city")
    Flowable<ApiResult<Map<String, List<JZGCity>>>> carTypeCity(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/car/clues")
    Flowable<SimpleApiResult> jzgClues(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("pc/traffic/city-list")
    Flowable<ApiResult<CityListResp>> cityList(@FieldMap Map<String, String> params);

    @FormUrlEncoded()
    @POST("v1/car/inspection-time")
    Flowable<ApiResult<String>> inspectionEndTime(@FieldMap Map<String, String> params);


    ////---- 吐槽

    @FormUrlEncoded
    @POST("bbs/topic-list")
    Flowable<ApiResult<List<TopicTagType>>> getTopicTags(@FieldMap Map<String, String> params);

    @Multipart
    @POST("bbs/create")
    Flowable<ApiResult<TopicModel>> createTopic(@Part List<MultipartBody.Part> parts);


    @FormUrlEncoded
    @POST("bbs/index")
    Flowable<ApiResult<TopicListResp>> topicList(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("bbs/star")
    Flowable<SimpleApiResult> topicAddLike(@FieldMap Map<String, String> params);


    @FormUrlEncoded()
    @POST("bbs/comment-list")
    Flowable<ApiResult<PageList<CommentModel>>> getCommentList(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("bbs/comment")
    Flowable<ApiResult<CommentModel>> addComment(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("bbs/comment-star")
    Flowable<SimpleApiResult> commentAddLike(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("bbs/delete")
    Flowable<SimpleApiResult> topicDelete(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("bbs/view")
    Flowable<ApiResult<TopicViewResp>> topicView(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("coupon/list")
    Flowable<ApiResult<CouponResp>> couponList(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("oil-price/index")
    Flowable<ApiResult<OilPriceResp>> oilPriceList(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("aliyun/get-sts-token")
    Flowable<ApiResult<OSSToken>> getOSSToken(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("v1/feedback/create")
    Flowable<SimpleApiResult> submitFeedback(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("v1/feedback/list")
    Flowable<ApiResult<List<FeedbackModel>>> myFeedbackList(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("v1/feedback/common")
    Flowable<ApiResult<List<CommonFeedbackQA>>> commonFeedbackList(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("official/query")
    Flowable<ApiResult<GovParseResp>> govQueryParse(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("v1/query/history")
    Flowable<ApiResult<List<TrafficViolationInfo>>> getFineHistory(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("captcha/ocr")
    Flowable<ApiResult<String>> decodeCaptchaImage(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("est-news/get-work-list")
    Flowable<ApiResult<List<BgWorkModel>>> getBgWorkList(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("v1/inspection/get-pre-config")
    Flowable<ApiResult<NjdbPreModel>> getInspectionModel(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("v1/inspection/create")
    Flowable<ApiResult<PaymentOrder>> createInspection(@FieldMap Map<String, String> params);


    @Multipart
    @POST("ocr/driving-licence")
    Flowable<ApiResult<OCRResult>> ocrDrivingLicence(@Part List<MultipartBody.Part> map);


    @FormUrlEncoded
    @POST("app/version/android-upgrade")
    Flowable<ApiResult<UpgradeModel>> checkUpgrade(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("order/pay-status")
    Flowable<ApiResult<OrderStatus>> checkPayStatus(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("captcha/get")
    Flowable<ApiResult<CaptchaData>> getCaptcha(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("captcha/valid")
    Flowable<ApiResult<CaptchaValidData>> validCaptcha(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("captcha/tencent-verify")
    Flowable<ApiResult<CaptchaValidData>> validCaptchaTc(@FieldMap Map<String, String> params);


    @FormUrlEncoded
    @POST("subscribe/setting")
    Flowable<SimpleApiResult> subscribeNotify(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("subscribe/setting")
    Flowable<SimpleApiResult> subscribeNotifyList(@FieldMap Map<String, String> params);
}
